package com.aistar.service.impl;

import com.aistar.mapper.TravellerMapper;
import com.aistar.pojo.Traveller;
import com.aistar.service.TravellerService;
import com.aistar.util.ServerResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class TravellerServiceImpl implements TravellerService {
    @Autowired
    TravellerMapper travellerMapper;

    @Override
    public ServerResponse addTrave(Traveller traveller) {
        int row = travellerMapper.insert(traveller);
        if (row > 0)
            return ServerResponse.addSuccess();
        else
            return ServerResponse.addFailed();

    }
}
